The present invention relates to 3D computer graphics, and more particularly, to non-photorealistic 3D imaging. Still more particularly, the present invention relates to methods and apparatus for computer generation and display of borders such as lines on silhouette and other edges of 3D objects.
Most computer graphics research has tended to focus on producing realistic images. This research has been very successful. Computers can now generate images that are so realistic that you can""t tell them apart from photographs. For example, many of us have seen very convincing dinosaurs, aliens and other photorealistic computer-generated special effects in movie and television. New pilots train on computer-based flight simulators so realistic that they nearly duplicate actual flying. Low-cost home video game systems can now provide a remarkable degree of realism, giving the game player an illusion of driving a real race car along a track, skiing down a snow and ice covered ski slope, walking through a medieval castle, or the like. For most games, this illusion of realism significantly enhances the game play experience.
Sometimes, however, a non-realistic image is preferable. For example, some types of interactive video and computer games provide entertainment value not by realistically simulating the real (or an imaginary) world, but instead by creating and displaying a cartoon world full of intentionally unrealistic caricature-like cartoon characters. Such games may, for example, attempt to duplicate a hand-drawn comic-book look while providing motion, speech and interactivity. In such 3D computer graphics systems, one desirable visual effect is to provide distinct solid borders such as lines at the silhouette and other edges of displayed objects. Such border lines can add clarity to certain images, e.g., helping the user to more clearly distinguish between different surfaces such as for example the outlines of a cartoon character, the hills and mountains of a landscape, the edges of walls, etc.xe2x80x94and the border lines may help create a desired impression of being hand-drawn by a cartoon artist.
One way to provide non-photorealistic effects such as border lines around the edges of characters or other objects such is to define separate line objects adjacent to the edges of the polygons modeling the object. But defining separate border objects can significantly increase image processing complexity. In a limited resource system, this approach could slow down image generation or otherwise sacrifice performance. Efficiency is especially important in low cost 3D graphics systems such as for example interactive 3D video game systems. More efficient techniques for generating visual effects are less taxing on scarce system resources, and therefore can enhance the overall visual experience without significantly sacrificing speed and other performance.
The present invention solves this problem by providing efficient techniques for displaying border lines at silhouette and other edges within a 3D videographics system such as a home video game console. In accordance with one aspect of the invention, border lines are generated after an image has been rendered into a frame buffer. The present invention uses values stored in the frame buffer to determine which pixels are located at silhouette or other certain edges of the object, and selectively blends border coloration into those pixels which are then displayed.
In accordance with one exemplary embodiment, silhouette edges are located by comparing pixel depth values with neighboring pixel depth values. In one particular example, a xe2x80x9cdistancexe2x80x9d value is calculated based on the absolute values of the distance(s) between a pixel""s depth and depths of neighboring pixels. A desired border line color is then blended into the pixel""s color value based on the calculated distance value. In one particular example, the distance value is used to calculate a pixel Alpha value, and the Alpha value is used to control the amount of border color that is blended into the pixel color.
Another example incorporates depth modulation. In this example, a pixel Alpha value is calculated based on both the distance value and a further value that is a function of pixel depth to provide an Alpha value that is modulated by the pixel""s depth value. The border color is then blended into the pixel color based on the depth-modulated Alpha value.
A further embodiment draws border lines on certain internal edges of an object not on the object""s silhouette, but which a cartoon artist might nevertheless apply a border line to. Consider, for example, the situation in which a cartoon character""s arm is held in front of his body. A cartoon artist would draw border lines around the silhouette of the character""s armxe2x80x94even if the character is holding the arm in front of his torso such that the arm""s silhouette edges are actually internal to the character""s overall silhouette. In accordance with a further feature of the present invention, pixels of the image are assigned different identification valuesxe2x80x94which ID values may be stored for example in frame buffer memory locations typically reserved for Alpha values. These pixel identification values are used to distinguish between border line edges and edges to which no border line is to be applied.